<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateBmrUsersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('bmr_users', function (Blueprint $table) {
            $table->comment = '健身用户';
            $table->increments('id');
            $table->timestamps();
            $table->softDeletes();

            $table->string('name', 30)->default('')->comment('名称');
            $table->string('phone', 15)->default('')->comment('手机号码');
            $table->tinyInteger('sex')->default(1)->comment('性别 1=男, 2=女');
            $table->index('phone');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('bmr_users');
    }
}
